package com.zzyl.mapper;


import com.zzyl.dto.ResourceDto;
import com.zzyl.entity.Resource;
import com.zzyl.vo.ResourceVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ResourceMapper {



    List<ResourceVo> list(ResourceDto resourceDto);

    void insert(Resource resource);

    @Delete("delete from sys_resource where resource_no = #{resourceNo}")
    void delete(String resourceNo);

    void enableState(@Param("state") String state, @Param("str") String str);

    @Select("select * from sys_resource where resource_no = #{resourceNo}")
    ResourceVo selectByResourceNo(String parentResourceNo);

    void update(Resource resource);

    List<String>  selectListByUserId(Long userId);
}
